package com.vhall.component.entity.room.enums;

/**
 * RefstatuEnum-
 *
 * @author xing.wang
 * @date 2023/8/12
 */

import com.vhall.component.entity.dictionary.enums.BaseEnum;

public enum RefStatuEnum implements BaseEnum {
    UNREFERENCED(0,"未引用")
    ,REFERENCED(1,"已引用");

    private final Integer value;
    private final String name;

    RefStatuEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getName() {
        return name;
    }
    public static String getNameByValue(Integer value) {
        for (RefStatuEnum e : RefStatuEnum.values()) {
            if (e.getValue().equals(value)) {
                return e.getName();
            }
        }
        return null;
    }
}
